package com.ag.work.action;

import java.util.Map;

import org.apache.log4j.Logger;
import org.apache.struts2.interceptor.SessionAware;

import com.ag.bean.TbUser;
import com.ag.common.BaseAction;
import com.ag.common.IPermissionService;

public class MyTaskAction extends BaseAction implements SessionAware{
	private static final Logger logger = Logger.getLogger(MyTaskAction.class);
	/**
	 * 调用权限服务逻辑组件
	 */
	private IPermissionService pms;
	/**
	 * 提供Map<String, Object>类型的Session变量，用来保存Struts2注入的Session上下文
	 */
	private Map<String, Object> sessionMap;
	
	public void setPms(IPermissionService pms) {
		this.pms = pms;
	}
	
	public String getMyTask(){
		TbUser user = pms.getCurrentUser(sessionMap);
		logger.info(user.getUId());
		return "";
	}
	
	@Override
	public void setSession(Map<String, Object> session) {
		this.sessionMap = session;
	}
}
